Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration test #473

Merged
merged 5 commits into from
Jan 24, 2023
Merged

Migration test #473

merged 5 commits into from
Jan 24, 2023

Conversation

dholms
Copy link
Collaborator

@dholms dholms commented Jan 19, 2023

This is actually a relatively easy migration to check that it went well.

Instead of the somewhat contrived test I was doing earlier, I just fill the db with sample data, migrate down (delete both tables), migrate up & ensure that the data matches


it('migrates down', async () => {
await db.migrator.migrateDown()
await expect(getHistory()).rejects.toThrow()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is responsible for the CI failure:

@atproto/pds: FAIL tests/migrations/repo-sync-data.test.ts (9.414 s)
@atproto/pds:   ● repo sync data migration › migrates down
@atproto/pds:     expect(received).rejects.toThrow()
@atproto/pds:     Received function did not throw
@atproto/pds:       54 |   it('migrates down', async () => {
@atproto/pds:       55 |     await db.migrator.migrateDown()
@atproto/pds:     > 56 |     await expect(getHistory()).rejects.toThrow()

Copy link
Collaborator

@devinivy devinivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Barring that one test failure which I can't explain, this looks good 👍 ! I like the change in methodology, too, with the down/up/compare!

@dholms dholms merged commit aba06d3 into sync-revamp Jan 24, 2023
@dholms dholms deleted the migration-test branch January 24, 2023 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants